package com.ds.infrastructure.hyperspace.console.model.request.operator;

import com.ds.infrastructure.hyperspace.console.entity.enums.TbPublicEnum;
import com.ds.infrastructure.hyperspace.console.entity.table.TbOperator;
import com.ds.infrastructure.hyperspace.console.model.request.form.PageForm;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author: yaozhendong
 * @create: 2019-09-25 17:56
 **/
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class ListOperatorForm extends PageForm {

    private Integer operatorType;

    public static TbOperator toEntity(ListOperatorForm form) {
        TbOperator tbOperator = new TbOperator();
        tbOperator.setOperatorType(form.getOperatorType());
        tbOperator.setGmtIsDeleted(TbPublicEnum.GMD_IS_DEL.NO.code);
        return tbOperator;
    }
}
